const SpeechTTS = uni.requireNativePlugin("MT-TTS-Speech");

export function initSpeech(text) {
  SpeechTTS.init((callback) => {
    // 设置语速
    // SpeechTTS.setPitch();
    // 设置语速
    SpeechTTS.setSpeed(4);
    if (callback == 0) {
      SpeechTTS.speak({
        text: text,
      });
    }
  });
}
